package com.codelab.statemachine.mybatis.dataobject;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.codelab.statemachine.task.Task;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@TableName(value = "task",autoResultMap = true)
@Data
@Accessors(chain = true)
public class TaskDO {

    @TableId(value = "id",type = IdType.ASSIGN_UUID)
    private String id;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private Map params;

    private double weight;

    private double progress;

    @TableField(value="taskcode")
    private String taskCode;

    @TableField(value="pid")
    private String pId;

    private String status;

    private String message;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

}
